{% extends "base.html" %}

{% load csrf_token_hack %}

{% block title %}NWS Wroclaw Library{% endblock %}

{% block header %}NWS Wroclaw Library{% endblock %}

{% block rest %}
  {% if is_dev %}
    <!-- development-only info -->
    <div class="tip" style=" width:80% ; padding: 20px; text-align:center; margin: auto; position:relative; left:-100px;">
      <p>Use <b>user</b> / <b>user</b> to log in as default user.</p>
      <p>Use <b>lib</b> / <b>lib</b> to log in as librarian.</p>
      <p>Use <b>admin</b> / <b>admin</b> to acquire an extra power -- has all perms and is staff.</p>
    </div>
    <!-- development-only info -->
  {% endif %}

<div id="login">
    <form action="." method="post" name="login">
    {% csrf_token %}
        {{ form.non_field_errors }}
        <table>
            <tr>
                <td>Username or email: </td>
                <td>{{form.username}}</td> <td>{{form.username.errors}}</td>
            </tr><tr>
                <td>Password: </td>
                <td><input type="password" name="password" value="" id="password" /></td> <td>{{form.password.errors}}</td>
            </tr><tr>
            <td></td><td>
                <input type="submit" value="Login" />
            </td></tr>
        </table>
        <input type="hidden" name="next" value="{{next}}" />
        <p class="register">
          No account? <a href="/entelib/register/newuser/">Register now</a>.
        <p>
        <p class="forgot_password">
          <a href="{% url forgot_password %}">Forgot your password?</a>
        </p>
    </form>
    <script type="text/javascript">
      document.login.id_username.focus();
    </script>
</div>
{% endblock %}
